/*
package com.icangya.lifePay;


import com.alibaba.fastjson.JSONObject;
import com.icangya.Utils.JSONUtils;
import com.icangya.Value.StaticValue;
import com.icangya.domain.Balance;
import com.icangya.domain.LiefpayDO;
import com.icangya.lifePay.http.HttpClientUtil;
import com.icangya.service.IFbWxSuitcaseService;
import com.icangya.service.IMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static com.icangya.Value.StaticValue.WX.ENTER_URL;

*/
/**
 * 微信公众号H5页面接口
 * 需要先调取微信公众号支付接口获取prepay_id
 *//*

@RestController
@RequestMapping("/6")
public class _6 {

    @Resource
    HttpClientUtil httpClientUtil;

    @Autowired
    private IFbWxSuitcaseService iFbWxSuitcaseService;

    @Autowired
    private IMoneyService iMoneyService;


    //生活圈支付回调notity_url
    @ResponseBody
    @RequestMapping(value = "/liefpaynotity",method = RequestMethod.GET)
    public JSONObject liefpaynotity(@RequestParam String strdata, HttpServletRequest request, HttpServletResponse response) throws Exception {

        System.out.println(strdata);
        String str[] = strdata.split("-");
        float moneyf = Float.parseFloat(str[0]);
        LiefpayDO liefpayDO = iFbWxSuitcaseService.getLiefpayDOByMerchant_order_sn(str[1]);
        liefpayDO.setMoney(String.valueOf(moneyf));
        liefpayDO.setPayStatus("1");
        boolean updateflag = iFbWxSuitcaseService.updateLiefpayDO(liefpayDO);

        Balance balance=iMoneyService.getUserBalanceByOpenId(liefpayDO.getOpenid());

        balance.setMoney(balance.getMoney()+moneyf);

        boolean bool=iMoneyService.updateBalanceByOpenId(balance);

        if (bool){

            response.sendRedirect(ENTER_URL + "parentID=0&proxyID=1");

            return JSONUtils.getRoot(0,"success","");
        }

        return JSONUtils.getRoot(-1,"faild","bug");



    }
}
*/
